<#include "../inc/view.html"/>
<@view>
            <form id="recruitAddForm${nowtime}" name="recruitAddForm" class="form-horizontal" action="/admin/recruit/save" method="post" data-validator-option="{theme:'yellow_top'}">
                <input type="hidden" name="recruit.id" value="${(po.id)!}">
            <div class="row">
                <div class="col-sm-6">
                    <ol class="breadcrumb">
                        <li>
                            <b>内容管理</b>
                        </li>
                        <li>
                            <a href="javascript:void(0);" onclick="contentLoadPage('/recruit')">招聘信息</a>
                        </li>
                        <li class="active">
                            <#if po??>修改<#else>新增</#if>
                        </li>
                    </ol>
                </div>
                <div class="col-sm-6">
                    <a onclick="contentLoadPage('/recruit')" class="btn-sm btn-white pull-right" style="margin-left:10px;"><i class="ti-arrow-left"></i>返回</a>
                    <button type="submit" class="btn-sm btn-success pull-right"><i class="ti-save"></i>保存</button>
                </div>
            </div>
            <hr>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">招聘岗位</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="recruit.jobname" data-rule="招聘岗位:required" value="${(po.jobname)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">招聘部门</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="recruit.dpt" data-rule="招聘部门:required" value="${(po.dpt)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">招聘人数</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="recruit.amount" data-rule="招聘部门:required" value="${(po.amount)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">工作地点</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="recruit.work_addr" data-rule="工作地点:required" value="${(po.work_addr)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">截止日期</label>
                            <div class="col-md-10">
                                <input type="text" id="end_date" class="laydate-icon form-control" style="width:120px;height:35px;" onclick="laydate({istime:false, format: 'YYYY-MM-DD'})" name="recruit.end_date" data-rule="截止日期:required" value="${(po.end_date)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">工作福利</label>
                            <div class="col-md-10">
                                <script id="welfare_editor${nowtime}" type="text/plain" name="recruit.welfare" style="width:99%;height:200px;">${(po.welfare)!}</script>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">任职资格</label>
                            <div class="col-md-10">
                                <script id="qualifications_editor${nowtime}" type="text/plain" name="recruit.qualifications" style="width:99%;height:200px;">${(po.qualifications)!}</script>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">岗位职责</label>
                            <div class="col-md-10">
                                <script id="duty_editor${nowtime}" type="text/plain" name="recruit.duty" style="width:99%;height:200px;">${(po.duty)!}</script>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">状态</label>
                            <div class="col-md-10">
                                <label><input type="radio" name="recruit.status" value="1" <#if 1==(po.status)!1 >checked</#if> /> 启用</label>
                                <label><input type="radio" name="recruit.status" value="0" <#if 2==(po.status)!1 >checked</#if> />禁用</label>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
</@view>
<script>
    $(function(){
        var welfare_editor$ = UE.getEditor('welfare_editor${nowtime}');
        var qualifications_editor$ = UE.getEditor('qualifications_editor${nowtime}');
        var duty_editor$ = UE.getEditor('duty_editor${nowtime}');
        ajaxForm($("#recruitAddForm${nowtime}"),function(json){
            if(json.code==RESULT_SUCCESS){
                contentLoadPage('/recruit');
            }else{
                if(json.msg)
                    layer.alert(json.msg,{icon:5,title:'系统提示',shadeClose:true});
            }
        });
    });
</script>